package pl.tssoft.math.core;

/**
 *
 * @author tomasz.serafin
 */
public class ValueFactory {

    public static Value createScalarValue() {
        return new Value();
    }

    public static Value createScalarValue(double real, double imag) {
        return new Value(real, imag);
    }

    public static Value createScalarConstant(String name, double real) {
        Value v = new Value(real, 0.0);
        v.setName(name);
        v.setConstant(true);
        return v;
    }

    public static Value createScalarVariable(String name) {
        Value v = new Value();
        v.setName(name);
        return v;
    }

    public static Value createScalarVariable(String name, double real, double imag) {
        Value v = new Value(real, imag);
        v.setName(name);
        return v;
    }

    public static Value createMatrixVariable(String name, int rows, int columns) {
        Value v = new Value(rows, columns);
        v.setName(name);
        return v;
    }
}
